import { assert } from "cc";
import { DataBatch, D } from "../Tensor";

export class TensorExtension {


    static convert4DTo8DAxis(axis: number): number {
        assert(axis < 4);
        assert(axis > -4);

        if (axis < 0) {
            return axis;
        } else if (axis === 0) {
            return DataBatch;
        } else {
            return axis + D;
        }
    }
}